package com.ethanzzh.security.ethanzzhcore.validate.code.image;

import com.ethanzzh.security.ethanzzhcore.validate.code.ValidateCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ImageCode extends ValidateCode {

    private static final long serialVersionUID = -7262322271462861302L;
    private BufferedImage image;

    public ImageCode(String code, LocalDateTime expireTime, BufferedImage image) {
        super(code, expireTime);
        this.image = image;
    }

   public ImageCode(BufferedImage image, String code, int expireIn){
        super(code,expireIn);
        this.image = image;

   }
}
